using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using FEL.COM;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class COM_COM_ATRIBUTO_DET : PaginaBaseKCG 
{
    public Com_Atributo Com_Atributo_Actual
    {
        get
        {
            if (ViewState["Com_Atributo_Id"] == null)
                ViewState["Com_Atributo_Id"] = ObtenerCom_Atributo();
            return (Com_Atributo)ViewState["Com_Atributo_Id"];
        }
    }

    Com_Atributo ObtenerCom_Atributo()
    {
        FEL.COM.BO_Com_Atributo datos = new BO_Com_Atributo();
        return datos.GetById("", Scope, Request.QueryString["Com_Atributo_Id"])[0];

    }

    protected void Page_Load(object sender, EventArgs e)
    {        
        base.Page_Load(sender, e);
        cargarBotones();
    }

    protected override CheckBox CbInsertarMemoria
    {
        get { return null; }
    }

    protected override Type TipoObjeto
    {
        get { return typeof(global::Com_Atributo_Det); }
    }

    protected override GridView Gv
    {
        get { return gvcom_atributo_det; }
    }

    protected override FormView Fv
    {
        get { return fvcom_atributo_det; }
    }

    protected override ObjectDataSource OdsGv
    {
        get { return odsgvcom_atributo_det; }
    }

    protected override ObjectDataSource OdsDv
    {
        get { return odsfvcom_atributo_det; }
    }

    protected override Button BResponderZoom
    {
        get { return Seleccionar; }
    }

    protected override Button BRegreso
    {
        get { return Atras; }
    }

    protected override Koala.KoalaWebControls.KFiltro KftFiltro
    {
        get { return kftFiltro; }
    }
    protected override string Contenedor
    {
        get { return "COM_ATRIBUTO_DET"; }
    }

    protected void nav_Siguiente(object sender, EventArgs e)
    {
        Gv_SelectedIndexChanged(sender, e);
    }
    protected override void DefinirParametrosFijosDeInsercion(System.Collections.Generic.List<DictionaryEntry> param)
    {
        if (Request.QueryString.Count > 0)
        {
            param.Add(new DictionaryEntry("Com_Atributo_Id", Request.QueryString["Com_Atributo_Id"]));
            param.Add(new DictionaryEntry("Com_Atributo_Codigo", Com_Atributo_Actual.Codigo));
            param.Add(new DictionaryEntry("Com_Atributo_Nombre", Com_Atributo_Actual.Nombre));            

        }
        base.DefinirParametrosFijosDeInsercion(param);
    }

    private void cargarBotones()
    {
        BtnArticulos_Com_Atr.Text = GetLocalResourceObject("Btn_Com_Atributo_Det_AtributoRecursoKCG.Text").ToString();
        BtnArticulos_Com_Atr.ToolTip = GetLocalResourceObject("Btn_Com_Atributo_Det_AtributoRecursoKCG.ToolTip").ToString();
    }

    protected void BtnArticulos_Com_Atr_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/COM/ARTICULOS_COM_ATRIBUTO.aspx");

    }
}
